import React, { useState, useEffect, useCallback, Fragment } from 'react';
import {
  Form,
  Table,
  Input,
  Button,
  Select,
  Space,
  Divider,
  Breadcrumb,
  message,
  Modal,
} from 'antd';
import CreateForm from './components/CreateForm'
import styles from './style.less'


const columns= [
 
  {
    title: '院校ID',
    dataIndex: 'schoolId',
  },
  {
    title: '院校名称',
    dataIndex: 'name'
  },
  {
    title: '工程类型',
    dataIndex: 'projectType'
  },
  {
    title: '院校类型',
    dataIndex: 'schoolType'
  },
  {
    title: '主办单位',
    dataIndex: 'department'
  },
  {
    title: '省份',
    dataIndex: 'province'
  },
  {
    title: '城市',
    dataIndex: 'city'
  },
  {
    title: '层级',
    dataIndex: 'level'
  },
  {
    title: '院校行业',
    dataIndex: 'facultyType'
  },
  {
    title: '官网',
    dataIndex: 'webSite',
  },
  {
    title: '校徽',
    dataIndex: 'icon',
  },
  {
    title: '操作',
    dataIndex: 'option',
    valueType: 'option',
    render: (_, record) => (
      <>
        <a
          onClick={() => {
            // handleUpdateModalVisible(true);
            // setStepFormValues(record);
          }}
        >
          编辑
        </a>
        <Divider type="vertical" />
        <a href="">删除</a>
      </>
    ),
  },
]; 




const College=(props)=> {
  const [dataSource, setDataSource] = useState([]);
  const [creatModalVisibile,setCreatModalVisibile]=useState(false)

const handleAddStudent =()=>{
  setCreatModalVisibile(true)
}
  const handleHidden =()=>{
    setCreatModalVisibile(false)
  }


  return (
    <>
      <div>
        <Breadcrumb  >
          <Breadcrumb.Item>首页</Breadcrumb.Item>
          <Breadcrumb.Item>基础信息</Breadcrumb.Item>
          <Breadcrumb.Item>院系专业信息</Breadcrumb.Item>
        </Breadcrumb> 
        <div className={styles.button}>  
            <Button  onClick={handleAddStudent}  >
              新增
            </Button> 
        </div>
        <Table
          rowKey="id"
          columns={columns}
          dataSource={dataSource} 
        /> 
        <CreateForm
        modalVisible={creatModalVisibile}
        onCancel={handleHidden}
        />
      </div>
    </>
  );
}

export default College;